import Vue from "vue";
import App from "./App.vue";
import ElementUI from "element-ui";
import 'element-ui/lib/theme-chalk/base.css';
import "element-ui/lib/theme-chalk/index.css";
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
import 'vant/lib/index.less';
import router from "./router/index.js";
import Router from 'vue-router'
import * as echarts from 'echarts';
import { DatetimePicker,Popup,Cell,Tab, Tabs,Icon,NavBar  } from 'vant';
import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.prototype.$http = axios;


Vue.prototype.$axios = axios

const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}


Vue.use(VueAxios, axios)
Vue.use(DatetimePicker);
Vue.use(Popup);
Vue.use(Cell);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Icon);
Vue.use(NavBar);
Vue.use(ElementUI);
Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false;
Vue.component(CollapseTransition.name, CollapseTransition)




new Vue({
  render: h => h(App),
  router,
}).$mount('#app')
// new Vue({
//   router,
//   render: (h) => h(App),
//   components: {
//     App
//   },
// });
